﻿@model Zatify.WebUI.Models.UserProfileBusinessReviewsViewModel
@{
    ViewBag.Title = "BusinessReviews";
    Layout = "~/Views/Shared/_MainLayout.cshtml";
}
<style type="text/css">
    .inner_container
    {
        float: none;
    }
</style>
<div class="wrapper">
    <!--inner container-->
    <div class="inner_container">
        <h2>
            @Model.Business.BusinessName
            <p class="sub_title_hd">@Model.Business.StreetAddress1 <span class="distance">
                @if (Model.Business.Distance.HasValue)
                { 
                    @Model.Business.Distance.Value.ToString("0.00")<text>mi</text>
                }
                else
                {
                    <text>N/A</text> 
                }
            </span>
            </p>
        </h2>
        <div class="details_banner" style="text-align: center; vertical-align: middle;">
            <img alt="" src="@Url.Action("GetBusinessPhoto", "UserProfile", new { businessId = Model.Business.BusinessId, w = 940, h = 350 })" />
        </div>
        <div class="deal_more_info">
            <h3>
                @Model.Business.BusinessName - Reviews</h3>
            <a href="@Url.Action("ReviewAdd", new { businessId = Model.Business.BusinessId })" class="blue_btn review_blue_btn">
                Add Reviews</a>
            @foreach (var review in Model.Reviews)
            {
                <div class="z_review">
                    <div class="review_user_img">
                        <img alt="" src="@Url.Action("GetUserPhotoById", "UserProfile", new { id = review.UserId, w = 80, h = 80 })" /></div>
                    <div class="review_details">
                        <h5>@review.UserName</h5>
                        <div class="rating_price">
                            @InlineHelpers.FiveStarsRatingReadonly(review.Rating)
                        </div>
                        <p>@*@InlineHelpers.TrimText(review.ReviewText, 100)*@
                            @review.ReviewText</p>
                    </div>
                </div>
            }
        </div>
    </div>
    <!--end inner container-->
    <div class="clearfix">
    </div>
</div>
